package com.caifu.enums;

/**
 * ClassName :ShopPropertyEnum
 *
 * @author :  yb
 * @description ：
 * @date : 2020-08-27 15:24
 */
public enum ShopPropertyEnum {

    /**
     *商铺产权 1-个人 2-企业
     */
    GR("1", "个人")
    ,QY("2", "企业")
    ;


    private String key;
    private String value;
    ShopPropertyEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public static String getName(String key) {
        for (ShopPropertyEnum c : ShopPropertyEnum.values()) {
            if (c.getKey().equals(key)) {
                return c.value;
            }
        }
        return "";
    }

    public static String getEnumKey(String name) {
        for (ShopPropertyEnum c : ShopPropertyEnum.values()) {
            if (c.getValue().equals(name)) {
                return c.key;
            }
        }
        return "";
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
